package com.walterweimod.auxiliary_attributes.attribute;

import com.walterweimod.auxiliary_attributes.Auxiliary_attributes;
import net.minecraft.world.entity.ai.attributes.Attribute;
import net.minecraftforge.eventbus.api.IEventBus;
import net.minecraftforge.registries.DeferredRegister;
import net.minecraftforge.registries.ForgeRegistries;
import net.minecraftforge.registries.RegistryObject;

public class ModAttributes {
    private ModAttributes(){}

    public static final DeferredRegister<Attribute> ATTRIBUTE_DEFERRED_REGISTER = DeferredRegister.create(ForgeRegistries.ATTRIBUTES, Auxiliary_attributes.MODID);

    public static final RegistryObject<Attribute> CRITICAL_HIT_CHANCE = ATTRIBUTE_DEFERRED_REGISTER.register("critical_hit_chance", () -> new CriticalHitChance().setSyncable(true));

    public static final RegistryObject<Attribute> CRITICAL_HIT_DAMAGE = ATTRIBUTE_DEFERRED_REGISTER.register("critical_hit_damage", () -> new CriticalHitDamage().setSyncable(true));

    public static final RegistryObject<Attribute> DEFENSE = ATTRIBUTE_DEFERRED_REGISTER.register("defense", () -> new Defense().setSyncable(true));

    public static final RegistryObject<Attribute> SPECIAL_DEFENSE = ATTRIBUTE_DEFERRED_REGISTER.register("special_defense", () -> new SpecialDefense().setSyncable(true));

    public static final RegistryObject<Attribute> HEAL_BONUS = ATTRIBUTE_DEFERRED_REGISTER.register("heal_bonus", () -> new HealBonus().setSyncable(true));

    public static final RegistryObject<Attribute> HEAL_BOOST = ATTRIBUTE_DEFERRED_REGISTER.register("heal_boost", () -> new HealBoost().setSyncable(true));

    public static final RegistryObject<Attribute> MAX_RAGE = ATTRIBUTE_DEFERRED_REGISTER.register("max_rage", () -> new MaxRage().setSyncable(true));

    public static final RegistryObject<Attribute> MIN_RAGE = ATTRIBUTE_DEFERRED_REGISTER.register(MinRage.DESCRIPTION, () -> new MinRage().setSyncable(true));

    public static final RegistryObject<Attribute> MAX_TENACITY = ATTRIBUTE_DEFERRED_REGISTER.register("max_tenacity", () -> new MaxTenacity().setSyncable(true));

    public static final RegistryObject<Attribute> MAX_HEAL_PERCENT = ATTRIBUTE_DEFERRED_REGISTER.register("max_heal_percent", () -> new MaxHealPercent().setSyncable(true));

    public static final RegistryObject<Attribute> MAX_BLOOD_POOL = ATTRIBUTE_DEFERRED_REGISTER.register(MaxBloodPool.DESCRIPTION, () -> new MaxBloodPool().setSyncable(true));

    public static void registerAttributes(IEventBus eventBus){
        ATTRIBUTE_DEFERRED_REGISTER.register(eventBus);
    }
}
